/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.netmaster.coitaonline.mb;

import com.netmaster.coitaonline.pojo.Servidor;
import com.netmaster.coitaonline.service.ServidorService;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author AbelGtzZ
 */
@ManagedBean
@RequestScoped
public class ServidorCatMB {

    private List<Servidor> servidores;

    @ManagedProperty("#{servidorServiceImpl}")
    private ServidorService srvdSrv;



    @PostConstruct
    public void init() {
        servidores = new ArrayList();
        servidores = srvdSrv.allServidor();
        Servidor s = new Servidor("tuxtla nuevo");
        servidores.add(s);
    }

    public List<Servidor> getServidores() {
        return servidores;
    }

    public void setServidores(List<Servidor> servidores) {
        this.servidores = servidores;
    }

    public void setSrvdSrv(ServidorService srvdSrv) {
        this.srvdSrv = srvdSrv;
    }

}
